def findMinAndMax(L):
    max = L[0]
    min = L[0]
    if len(L) == 0:
        return (None, None)
    else:
        for value in L:
            if value < min:
                min = value
            if value > max:
                max = value
    return (min, max)


print(findMinAndMax([1, 2, 4, 2, 56, 6]))
